package com.tifa.vote.service.impl;

import com.tifa.vote.bean.Vote;
import com.tifa.vote.dao.VoteDao;
import com.tifa.vote.service.VoteService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Classname VoteServiceImpl
 * @Description
 * @Date 2022/6/15 15:27
 * @Created by hengyuan
 */
@Service
public class VoteServiceImpl implements VoteService {

  @Autowired
  VoteDao voteDao;

  @Override
  public List<Vote> getVotes() {
    return voteDao.getVotes();
  }

  @Override
  public Vote getVoteById(Integer id) {
    return voteDao.getVoteById(id);
  }

  @Override
  public void deleteVoteById(Integer id) {
    voteDao.deleteVoteById(id);
  }

  @Override
  public void addVote(Vote vote) {
    voteDao.addVote(vote);
  }
}
